﻿CREATE TABLE [dbo].[PurchaseLog] (
    [Id]           UNIQUEIDENTIFIER CONSTRAINT [DF_PurchaseLog_Id] DEFAULT (newid()) ROWGUIDCOL NOT NULL,
    [PurchaseDate] DATETIME2 (7)    NOT NULL,
    [Store]        UNIQUEIDENTIFIER NOT NULL,
    [TotalCost]    MONEY            NOT NULL,
    [Note]         NVARCHAR (300)   NOT NULL,
    CONSTRAINT [PK_PurchaseLog] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_PurchaseLog_Store] FOREIGN KEY ([Store]) REFERENCES [dbo].[Store] ([Id])
);

